﻿Imports System.Text
Imports Microsoft.VisualStudio.TestTools.UnitTesting

Imports CQRSAzure.Tools

<TestClass()>
Public Class ProjectionModelUnitTest

    <TestMethod()>
    Public Sub Constructor_Empty_TestMethod()

        Dim testObj As New ProjectionModel()

        Assert.IsNotNull(testObj)

    End Sub

    <TestMethod>
    Public Sub Constructor_Name_TestMethod()

        Dim testObj As New ProjectionModel("TestName")
        Assert.IsNotNull(testObj)

    End Sub

    <TestMethod>
    Public Sub Name_RoundTrip_TestMethod()

        Dim expected As String = "ExpectedName"
        Dim actual As String = "ActualName"

        Dim testObj As New ProjectionModel(expected)
        actual = testObj.Name

        Assert.AreEqual(expected, actual)

    End Sub

End Class

<TestClass>
Public Class ProjectionModelEventArgsUnitTest

    <TestMethod>
    Public Sub Constructor_TestMethod()

        Dim testObj As New ProjectionModelEventArgs("ProjectionName")
        Assert.IsNotNull(testObj)

    End Sub

    <TestMethod>
    Public Sub ProjectionName_RoundTrip_TestMethod()

        Dim expected As String = "ExpectedProjectionName"
        Dim actual As String = "ActualProjectionName"

        Dim testObj = New ProjectionModelEventArgs(expected)
        actual = testObj.ProjectionName

        Assert.AreEqual(expected, actual)

    End Sub

End Class